package com.eternallove.job;

import com.eternallove.core.job.BaseJob;
import com.eternallove.core.job.JobContext;
import com.eternallove.core.job.JobParam;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * 普通的定时任务
 * @author Eva.Caesar Liu
 * @since 2022/11/30 15:45
 */
@Slf4j
@Component("commonTestJob")
public class CommonTestJob extends BaseJob {

    @Override
    public JobContext execute(JobParam param) {
        JobContext jobContext = new JobContext();
        try {
            jobContext.setContext("暂停20000毫秒");
            Thread.sleep(20000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return jobContext;
    }
}
